import serial
import time
import threading
global ser

global ser
ser=serial.Serial("/dev/ttyUSB0",115200,timeout=0.5)
ser.write('3'.encode())
print("send successfully!")
read = ser.readall()
if len(read) > 0:
    print("recevie successfully!")
    print(read)
